Get All Newly Placed Orders In A Presale Round
The functions described is accessible only to users with ADMIN privileges.
The getNewPresaleOrders
query is used to retrieve all newly placed presale orders in a specified presale round, starting from a specified order ID. This is useful for updating the presale order list on the user side.
Query: getNewPresaleOrders
Schema:
getNewPresaleOrders(
presaleId: Int!,
lastOrderId: Int!
): [PreSaleOrder]
Parameters
presaleId
(Int): The ID of the presale round to retrieve new orders for. This field is mandatory.lastOrderId
(Int): The ID of the last order to start retrieving new orders from. This field is mandatory.
Return
The query returns a list of PreSaleOrder
objects that were placed after the specified order ID in the specified presale round.
Example Query
The following is an example of how to use the getNewPresaleOrders
query to retrieve all newly placed orders in a specific presale round:
query {
getNewPresaleOrders(
presaleId: 1,
lastOrderId: 100
) {
id,
presaleId,
userId,
ndbAmount,
destination,
extAddr,
status,
createdAt,
updatedAt
}
}
In this example, the query retrieves all new presale orders for the presale round with ID 1
that were placed after the order with ID 100
. Each PreSaleOrder
object in the returned list includes details such as id
, presaleId
, userId
, ndbAmount
, destination
, extAddr
, status
, createdAt
, and updatedAt
.